package cn.owen.json.model;

public class JsonResponse<T> {

	private String status;

	private String message;
	
	private T data;
	
	public enum Status {
		SUCCESS("success"), FAIL("fail");
		private final String value;

		private Status(final String value) {
			this.value = value;
		}

		@Override
		public String toString() {
			return value;
		}
	}

	public JsonResponse() {
	}

	public JsonResponse(String status) {
		this.status = status;
	}

	public JsonResponse(String status, String message) {
		this.status = status;
		this.message = message;
	}
	
	public JsonResponse(String status, T data) {
		this.status = status;
		this.data = data;
	}

	public JsonResponse(String status, String message, T data) {
		this.status = status;
		this.message = message;
		this.data = data;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}

}
